home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 1
/
Gold Medal Software Volume 1 (Gold Medal) (1994).iso
/
print
/
fold33.arj
/
TUNF.DOC
< prev
next >
Wrap
Text File
|
1993-11-11
|
8KB
|
224 lines
Text UNFormatter
version 0.11
User's Manual
(C) Konrad Budych 1993
Text UNFormatter is a utility which removes page breaks, headers, and
footers from formatted ASCII texts to make it easier to print them with
FOLD-and-PRINT.
To install TUNF please copy TUNF.EXE to a directory listed in your
PATH and that is all you need to do to start working with the program.
WHAT DOES Text UNFormatter EXACTLY DO?
======================================
Many ASCII documents are formatted. They are divided into pages with
headers at the top and footers at the bottom of the page. They are supposed
to look nice if you print them with a simple COPY or PRINT command. But they
surely do not look nice when you print them with FOLD-and-PRINT when pages
contain a lot of more text than the original pages and original pages may
begin and end in every place on the real sheet.
Until now when you wanted to print a formatted document with
FOLD-and-PRINT you had to unformat it manually if you wanted it to have a
decent layout. Until now, <<fanfares>> because now you can use TUNF, The Text
UNFormatter <<fanfares fade>>.
TUNF reads a text, finds a couple of page breaks, determines what is a
header/footer (and can be removed) and what is not (and should not be
removed). Then it removes from the entire text what it decided that can be
removed. That is all.
USING Text UNFormatter
======================
Please look at some examples first, the complete syntax and options
description will be described later.
Assume you have a file TEXT.TXT which is an ASCII text, formatted into
pages, with headers and footers. And pages are separated with ASCII form feed
character (FF ASCII 12). The latter is very important: TUNF will not be able
to find page breaks if there are no FF characters in the text. If you run:
TUNF TEXT.TXT
you will receive (if everything was okay) on your disk the following files:
TEXT.TXT - unformatted version of the text
TEXT.BAK - original, unchanged, renamed TEXT.TXT
REMOVED.TXT - the file containing lines that were removed from the text
(Note: you should not run TUNF on the file that has .BAK extension!)
TUNF has found some page breaks, looked at some lines below and above,
decided what can be removed, and done it. Please always look at the
REMOVED.TXT file to find out whether TUNF decision was correct and it did not
removed too much and at the new TEXT.TXT and find the place where page ended
before to find out whether TUNF decision was correct and it did not removed
too little.
If TUNF decision is wrong you may force your choice:
TUNF -a1 -b2 -p- TEXT.TXT
This causes TUNF to remove one line (a)bove the page break, two lines (b)elow
the page break, and to leave the line containing the page break.
TUNF can make the wrong decision because often a few first page breaks
in a document have a different structure than the all others. TUNF may ignore
the couple of first page breaks and start reading and analysing them later:
TUNF -s5 TEXT.TXT
This will tell TUNF to ignore the first 5 page breaks it finds, and start
collecting page breaks for analysis starting from the 6th one.
But this may cause that too many or too few lines is deleted somewhere
in the text. The only way to unformat such a text is manual plus a great help
from TUNF and... DOS.
TUNF -m TEXT.TXT
This will create a file TEXT.TXT with the lines to be removed marked with
'@X@:' (no quotes) at the beginning of a line. You may then edit such a file,
add or remove these 'signatures'. After you modify the file, use one of these
commands:
FIND /V "@X@:" TEXT.TXT > TEXT.$$$
DEL TEXT.TXT
REN TEXT.$$$ TEXT.TXT
to remove marked lines from the text, or
FIND "@X@:" TEXT.TXT > REMOVED.TXT
to create a file containing the lines that will be deleted by the previous
commands.
COMPLETE SYNTAX AND OPTIONS DESCRIPTION
=======================================
You may run 'TUNF -?' to see the help screen.
The full syntax is as follows:
TUNF [options] filename [options]
Options may be preceded by either '-' or '/'. Options must be
separated: something like '/r/a5' is legal but treated as '/r', you should use
'/r /a5'.
Options are turned on when they are
followed by a '+' or nothing (eg. '-r+ -z') and turned off when followed by a
'-' (eg. '-z-').
The content of environmental variable TUNF is always scanned before
any command line arguments, so you may turn on some options using this
variable.
Filename is any legal DOS filename with optional drive and path.
Wildcards ('*' and '?') are not allowed and only one file name can be given.
Error occurs otherwise.
Here is the full list of options that are available in Text
UNFormatter version 0.11:
-a<nnn>: remove nnn lines above the page break
-b<nnn>: remove nnn lines below the page break
-s<nnn>: ignore nnn first page breaks (default: 3)
-f<nnn>: remove nnn first lines of text (default: 0)
-p : remove line with FF (default)
-m : mark (don't delete) lines to delete
-z : only analyse input text
-r : don't create 'removed.txt' file
-d : delete original text (don't leave .BAK file)
And here is the detailed description of all options:
-annn
This sets the number of lines that should be deleted ABOVE the line
with page break. One of the analysis results is ignored if this option is
used. '-a' is equivalent to '-a0'.
-bnnn
This sets the number of lines that should be deleted BELOW the line
with page break. One of the analysis results is ignored if this option is
used. '-b' is equivalent to '-b0'.
-snnn
This will cause TUNF to ignore the nnn first page breaks found in an
input file. The default value is 3.
-fnnn
This sets the number of lines that should be deleted from the
beginning of an input file. This is useful if the file contains a header you
want to remove or a lot of empty lines.
-p
This insures that the lines containing page break will be removed.
One of the analysis results is ignored if this option is used. Use '-p-' to
insure that these lines will not be removed.
-m
If this option is active, the lines to be deleted are not deleted from
the input file. Instead, they are marked with '@X@:' (without quotes) at the
beginning of each such line. You may then manually (un)mark lines of your
choice and use some tool like DOS FIND command to remove marked lines.
-z
If this option is active, TUNF will only analyse an input file but
will not affect it in any way. Analysis results are displayed on screen.
-r
This prevents creation of 'removed.txt' file. Use it when you are
sure what you are doing...
-d
This prevents creation of the backup (xxxx.BAK) of the original input
file. Use it when you are sure what you are doing...
FINAL NOTES
===========
This program is experimental. It is assumed to HELP to unformat a
text before you print it with FOLD-and-PRINT and not to DO it without any help
and mistakes sometimes.
This program is a part of FOLD-and-PRINT package. For some legal
issues, acknowledgements, or how to contact author, please see FOLDADD.DOC
file (addendum to FOLD-and-PRINT manual). Any suggestions, bug reports,
opinions, and your support is welcome.
End of User's Manual
********************